package com.codejoys.monitor.dto;

import com.codejoys.monitor.domain.Device;
import com.codejoys.monitor.domain.Role;
import com.codejoys.monitor.domain.User;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public class DeviceDto extends Device {
    private String channel;

    private BigDecimal voltage;

    private BigDecimal current;

    private BigDecimal temperature;

    private String errorCode;

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public BigDecimal getVoltage() {
        return voltage;
    }

    public void setVoltage(BigDecimal voltage) {
        this.voltage = voltage;
    }

    public BigDecimal getCurrent() {
        return current;
    }

    public void setCurrent(BigDecimal current) {
        this.current = current;
    }

    public BigDecimal getTemperature() {
        return temperature;
    }

    public void setTemperature(BigDecimal temperature) {
        this.temperature = temperature;
    }

    public String getErrorCode() {
        if (this.getAgingErrorCode() != null) {
            return Integer.toBinaryString(this.getAgingErrorCode());
        }

        return null;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }
}
